<!doctype html>
<head>
        <meta name="keywords" content="羽毛球，球馆，球场，教练">
		<meta name="charset" content="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/jquery.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/bootstrap.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/md5.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/jquery-form.js"></script>
		<style type="text/css">
	    #allmap{
	     height:500px;width:100%;
	   }
	   </style>
</head>		
<form class='' id='' name="" action="__APP__/Home/Gymnasium/updateGymnasium" method="post" enctype="multipart/form-data">
				<table  style="">
                <tbody>
                   <tr>
                   	   <td>
                   		   <label title='' for="gymnasium_name">球馆名称</label>
                   	   </td>
                   	   <td>
                   		   <input type="text" name="gymnasium_name" id="gymnasium_name" maxlength="50"/><input type="hidden" name="gymnasium_id" id="gymnasium_id" maxlength="50"/>
                   	   </td>
                   </tr>
                     
                   <tr>
                   	   <td>
                   		   <label title='' for="gymnasium_open_time">开馆时间（小时）</label>
                   	   </td>
                   	   <td>
                   		   <input type="number" id="gymnasium_open_time" name="gymnasium_open_time" value="" min="0" max="24"/>
                   	    </td>
                   </tr>
                   <tr>
                   	   <td>
                   		   <label title='' for="gymnasium_close_time">闭馆时间（小时）</label>
                   	   </td>
                   	   <td>
                   		   <input type="number" id="gymnasium_close_time" name="gymnasium_close_time" value="" min="0" max="24"/>
                   	    </td>
                   </tr>
                   <tr>
                   	   <td>
                   		   <label title='' for="gymnasium_phone_number">球馆预定单元（分钟）</label>
                   	   </td>
                   	   <td>
                   		   <input type="number" id="gymnasium_book_unit" name="gymnasium_book_unit" value="" min="0" placeholder="单位（分钟）"/>
                   	    </td>
                   </tr>
                   <tr>
                   	   <td>
                   		   <label title='' for="gymnasium_court_number">球馆场地数</label>
                   	   </td>
                   	   <td>
                   		   <input type="number" id="gymnasium_court_number" name="gymnasium_court_number" value="" />
                   	    </td>
                   </tr>
				   <tr>
                   	   <td>
                   		   <label title='' for="gymnasium_address">球馆地址</label>
                   	   </td>
                   	   <td>
                   		   <input type="text" id="gymnasium_address" name="gymnasium_address" value="" maxlength="100"/>
                   	    </td>
                   </tr>
				    <tr>
                   	   <td>
                   		   <label title='' for="gymnasium_phone_number">球馆电话</label>
                   	   </td>
                   	   <td>
                   		   <input type="text" id="gymnasium_phone_number" name="gymnasium_phone_number" value="" maxlength="15"/>
                   	    </td>
                   </tr>
				     <tr>
                   	   <td>
                   		   <label title='' for="gymnasium_location_x">坐标x:</label>
                   	   </td>
                   	   <td>
                   		   <input type="text" name="gymnasium_location_x" id="gymnasium_location_x" readonly="readonly"/>
                   	   </td>
					   <td>
                   		   <label title='' for="gymnasium_location_y">坐标y:</label>
                   	   </td>
                   	   <td>
                   		   <input type="text" name="gymnasium_location_y" id="gymnasium_location_y" readonly="readonly"/>
                   	   </td>
                   </tr>
				    <tr>
                   	  <td>
                   		   <span>省:</span>
					  </td>
					 
					  <td>
                   		   <input type="text" name="gymnasium_location_province" id="gymnasium_location_province" readonly="readonly"/>
                   	  </td>
					  <td>  
						  <span >市:</span>
                   	   </td>
					   <td>
						   <input type="text" name="gymnasium_location_city" id="gymnasium_location_city" readonly="readonly"/>           	  
                   	   </td>
					   <td>
			               <span >区:</span>
                   		</td>  
						<td>
						   <input type="text" name="gymnasium_location_district" id="gymnasium_location_district" readonly="readonly"/>
                   	  </td>
                   </tr>
                   <tr>
                   	   <td>
                   		   <label title='' for="gymnasium_description">球馆描述</label>
                   	   </td>
                   	   <td>
                   	   	<textarea id="gymnasium_description" name="gymnasium_description" rows="3" cols="20" maxlength="1000"></textarea>
                   	    </td>
                   </tr>   
                   <tr>
                        <td>
                              <label title='球馆图片' for="gymnasium_picture">球馆图片</label>
                        </td>
                        <td>                
                              <input type="file" name="gymnasium_picture" id="gymnasium_picture"/>
                        </td>
                   </tr>
				   
                  </tbody> 
                </table>
                <input type="submit" />  
            </form>
			<td>  
				<input type="text" name="location_search" id="location_search" />	 
             </td>
			 <td>		              	  
                   <button onclick="search()">搜索</button>
			 </td>
			 <div id="allmap"></div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=rcfrAjfdc6nRlfxkCxG3iSeF"></script>
<script type="text/javascript" src="__PUBLIC__/JS/map.js"></script>
<script type="text/javascript">
 $(function(){
		$.post('__URL__/gymnasiumDetail',{'gymnasium_id':parent.selected},function(resultList){ 			   
			  gymnasiumJson=resultList.result;
			  document.getElementById("gymnasium_id").value=gymnasiumJson.gymnasium_id;
			  document.getElementById("gymnasium_name").value=gymnasiumJson.gymnasium_name;
			  document.getElementById("gymnasium_description").value=gymnasiumJson.gymnasium_description;
			  document.getElementById("gymnasium_open_time").value=gymnasiumJson.gymnasium_open_time;
			  document.getElementById("gymnasium_close_time").value=gymnasiumJson.gymnasium_close_time;
			  document.getElementById("gymnasium_book_unit").value=gymnasiumJson.gymnasium_book_unit;
			  document.getElementById("gymnasium_court_number").value=gymnasiumJson.court_number;
			  document.getElementById("gymnasium_address").value=gymnasiumJson.gymnasium_location_bref;
			  document.getElementById("gymnasium_phone_number").value=gymnasiumJson.gymnasium_phone_number;
			  document.getElementById("gymnasium_location_x").value=gymnasiumJson.gymnasium_location_x;
			  document.getElementById("gymnasium_location_y").value=gymnasiumJson.gymnasium_location_y;
			  document.getElementById("gymnasium_location_province").value=gymnasiumJson.gymnasium_province;
			  document.getElementById("gymnasium_location_city").value=gymnasiumJson.gymnasium_city;
			  document.getElementById("gymnasium_location_district").value=gymnasiumJson.gymnasium_district;
    	     },'json');  
			
		});
</script>